<script>

    var requireJS = [
        //"/static/admin/js/libs/jquery.dataTables.min.js",
        //"/static/admin/js/libs/dataTables.bootstrap4.min.js",
        "/static/admin/js/libs/jquery.validate.js",
        "/static/admin/js/libs/jquery.validate.messages_cn.js",
        "/static/admin/js/libs/bootstrap-table/bootstrap-table.js",
        "/static/admin/js/libs/bootstrap-table/bootstrap-table-zh-CN.js",
        "/static/admin/js/libs/toastr.min.js"
    ];
    loadCSS("/static/admin/css/bootstrap-table/bootstrap-table.css")
    //loadCSS("/static/admin/css/bootstrap.min.css")
    loadJS(requireJS, "/static/admin/js/views/menu.js");
    loadJS(requireJS, "/static/admin/js/views/toastr-init.js");
    //loadCSS("/static/admin/css/bootstrap.min.css")


</script>


<div class="animated fadeIn">
    <div class="card-header">
        <i class="fa fa-edit"></i> {{controller.meta_title}}
    </div>
    <div class="container">
        <div class="row">
            <div class="col">
                <div id="toolbar">
                    <div class="btn-group">
                        <button type="button" id="refresh" class="btn btn-warning ">
                            <i style="width: 13px" class="fa fa-list text-white"></i>
                        </button>
                        <button onclick="goModel('add')" type="button" data-toggle="modal" class="btn btn-primary"
                                title="添加">
                            <i class="fa fa-pencil" aria-hidden="true"></i>
                        </button>
                        <button onclick="goModel('edit')" type="button" data-toggle="modal" class="btn btn-primary" title="修改">
                            <i class="fa  fa-edit" aria-hidden="true"></i>
                        </button>
                        <button onclick="goModel('del')" type="button" data-toggle="modal" class="btn btn-primary" title="删除">
                            <i class="fa fa-trash-o " aria-hidden="true"> </i>
                        </button>
                    </div>
                    <div class="btn-group ">
                        <button id="btn_O" onclick="goModel('add')" type="button" data-toggle="modal"
                                class="btn btn-success" title="添加">
                            <i style="width: 13px" class="fa fa-unlock text-white" aria-hidden="true"> </i>
                        </button>
                        <button id="btn_C" onclick="goModel('edit')" type="button" data-toggle="modal"
                                class="btn btn-danger" title="修改">
                            <i style="width: 13px" class="fa fa-unlock-alt " aria-hidden="true"> </i>
                        </button>
                        <button id="btn_b" onclick="goModel('del')" type="button" data-toggle="modal"
                                class="btn btn-danger" title="删除">
                            <i style="width: 13px" class="fa fa-unlock-alt " aria-hidden="true"> </i>
                        </button>
                    </div>
                </div>

                <table

                        id="{{controller.action_id}}Table"
                        data-pagination="true"
                        data-search="true"
                        data-loading="true"
                        data-advanced-search="true"
                        data-id-table="advancedTable"
                        class="table table-striped table-bordered ">


                </table>
            </div>
            <div hidden class="col-3 action-left-solid"></div>
        </div>
    </div>

</div>
<div class="modal fade" id="{{controller.action_id}}Modal" tabindex="-1" role="dialog"
     aria-labelledby="{{controller.action_id}}ModalLabel">
    <div class="modal-dialog" role="document">
        <div style="width: 110%" class="modal-content">
            <div class="modal-header">

                <h4 class="modal-title" id="{{controller.action_id}}ModalLabel"></h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
            </div>
            <form id="{{controller.action_id}}Form" method="post">
                <div style="padding-left: 5%;padding-right: 5%;padding-bottom: 0px;" class="modal-body">
                    <div class="modal-body row">
                        <label class="col-md-2 form-control-label top-8px" for="m_title">目录名称</label>
                        <div class="col-md-10">
                            <input type="text" name="m_title" id="m_title" class="form-control"
                                   placeholder="请输入目录名称" data-required="true">
                        </div>

                    </div>
                    <div class="modal-body row">
                        <label class="col-md-2 form-control-label top-8px" for="m_sort">排序</label>
                        <div class="col-md-10">
                            <input type="text" name="m_sort" id="m_sort" class="form-control"
                                   placeholder="请输入排序" data-required="true" value="0">
                        </div>

                    </div>
                    <div class="modal-body row">
                        <label class="col-md-2 form-control-label top-8px" for="m_url">地址</label>
                        <div class="col-md-10">
                            <input type="text" name="m_url" id="m_url" class="form-control"
                                   placeholder="请输入排序" data-required="true" >
                        </div>
                    </div>
                    <div class="modal-body row">
                        <label class="col-md-2 form-control-label top-8px" for="m_group">上级目录</label>
                        <div class="col-md-10">
                            <select id="m_group" name="m_group" class="form-control">
                                <option value="0">一级目录</option>
                                <option value="1">系统设置</option>
                                <option value="0">成员管理</option>
                            </select>
                        </div>
                    </div>
                    <div class="modal-body row">
                        <label class="col-md-2 form-control-label top-8px" for="m_tf">状态</label>
                        <div class="col-md-10">
                            <select id="m_tf" name="m_tf" class="form-control">
                                <option value=" ">请选择状态</option>
                                <option value="1">启用</option>
                                <option value="0">禁用</option>
                            </select>
                        </div>
                    </div>
                    <div class="modal-body row">
                        <label class="col-md-2 form-control-label top-8px" for="m_deve">开发模式</label>
                        <div class="col-md-3 radio">
                            <input  type="radio" value="1" name="m_deve">是

                            <input type="radio" value="0" name="m_deve">否
                        </div>
                    </div>
                    <div class="modal-body row">
                        <label class="col-md-2 form-control-label top-8px" for="m_icon">图标</label>
                        <div class="col-md-10">
                            <input type="text" name="m_icon" id="m_icon" class="form-control"
                                   placeholder="图标 比如:fa-close" data-required="true" >
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" id="{{controller.action_id}}Action" name="{{controller.action_id}}Action">
                    <input type="hidden" name="id" value="">
                    <button type="button" class="btn btn-sm btn-default" data-dismiss="modal"><i class="fa fa-close"></i> 关闭</button>
                    <button type="reset" class="btn btn-sm btn-danger"><i class="fa fa-ban"></i> 重置</button>
                    <button type="submit" onclick="goFormValidator('{{controller.action_id}}',{{controller.action_id}}ValidatorRules())"
                            class="btn btn-sm btn-primary"><i
                            class="fa fa-dot-circle-o"></i> 保存
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>